<?php
//单页面
namespace Home\Controller;
use Org\Yike\FangCms;
class OneController extends CommonController {
    public function _initialize(){
        parent::_initialize();
        $this->one_cate = M('one_cate')->where(array('status'=>1))->order('ordid desc')->select();
    }

    public function index(){
        $alias = I('get.alias');
        $alias = strip_tags($alias);
        $cate = M('one_cate')->where(array('alias'=>$alias))->find();
        if(!$cate['id']){
            $this->error('参数有错误');
        }
        $info = M('one')->where(array('cate_id'=>$cate['id']))->find();
        $this->seoKey($info);
        $this->info = $info;
        $this->display();
    }

}